/*
* @Author: Slience
* @Date:   2019-07-09 11:36:31
* @Last Modified by:   Sean
* @Last Modified time: 2019-09-17 01:23:43
*/
import request from '@/plugins/request'
import url from '@/plugins/url'

// let ip = 'http://192.168.96.166:5757';
let ip = 'http://localhost:5757';

/**
 * 获取所有权限组
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function get_rule_group_all(data) {
  return request({
    url: ip+'/api/admin/rule_group_all',
    method: 'POST',
    data: data
  })
}


/**
 * 添加权限组
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function rule_group_add(data) {
  return request({
    url: ip+'/api/admin/rule_group_add',
    method: 'POST',
    data: data
  })
}


/**
 * 更新权限组
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function rule_group_edit(data) {
  return request({
    url: ip+'/api/admin/rule_group_edit',
    method: 'POST',
    data: data
  })
}

/**
 * 删除权限组
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function rule_group_del(data) {
  return request({
    url: ip+'/api/admin/rule_group_del',
    method: 'POST',
    data: data
  })
}



/**
 * 获取权限树
 * @param  {[type]} data [description]
 * @return {[type]}      [description]
 */
export function get_rule_list(data) {
  return request({
    url: ip+'/api/admin/rule_list',
    method: 'POST',
    data: data
  })
}
